using Agile.Common;

namespace GeneratorCustomization
{
    /// <summary>
    /// SpecialColumn
    /// </summary>
    public abstract class SpecialColumn
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="database">Name of the database the table is in.</param>
        /// <param name="table">Name of the table the column is in.</param>
        /// <param name="column">Name of the special column.</param>
        /// <remarks>Only the Column name is mandatory. If the table name is not supplied then the 
        /// special rules should apply for ALL tables. Same is true for the database, if it is not
        /// supplied then the special rule will apply for all tables in all databases.</remarks>
        protected SpecialColumn(string database, string table, string column)
        {
            ArgumentValidation.CheckForNullReference(column , "column");

            ArgumentValidation.CheckForEmptyString(column , "column");

            _database = database;
            _table = table;
            _column = column;
        }


        private string _database;
        private string _table;
        private string _column;

        /// <summary>
        /// Name of the special column.
        /// </summary>
        public string ColumnName
        {
            get { return _column; }
        }

        /// <summary>
        /// Name of the table the special column is in.
        /// </summary>
        /// <remarks>If this is an empty string then the special rule should apply to ALL tables.</remarks>
        public string Table
        {
            get { return _table; }
        }

        /// <summary>
        /// Name of the database the table is in.
        /// </summary>
        /// <remarks>If this is an empty string then the special rule should apply to ALL tables in ALL databases.</remarks>
        public string Database
        {
            get { return _database; }
        }

    }
}